<html xmlns:th="http://www.thymeleaf.org">
<body>
<div th:fragment="nav">
    <nav class="navbar navbar-inverse navbar-fixed-top" style="margin: 0; border: 0">
        <div class="container">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
            </div>
            <div id="navbar" class="navbar-collapse collapse">
                <ul class="nav navbar-nav">
                    <li>
                        <a href="/" >首页</a>
                    </li>
                    <li>
                        <a href="http://www.jianshu.com/u/7b7ec6f2db21" target="_blank">作者</a>
                    </li>
                    <li>
                        <a href="http://spring4all.com" target="_blank">Spring4All社区</a>
                    </li>
                </ul>
                <div class="navbar-form navbar-right">
                    <a class="btn btn-danger" th:href="@{/user}" th:if="${#httpServletRequest.remoteUser}">个人中心</a>
                    <a class="btn btn-success" th:href="@{/login}" th:unless="${#httpServletRequest.remoteUser}">登录</a>
                </div>
            </div>
        </div>
    </nav>
</div>
</body>
</html>